package com.xilihui.xlh.business.activitys.store;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.TextView;

import com.xilihui.xlh.R;
import com.xilihui.xlh.core.app.BaseCompatActivity;

import org.feezu.liuli.timeselector.Utils.TextUtil;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by Administrator on 2018/9/25.
 */

public class TradeSuccessActivity extends BaseCompatActivity{
    
    @BindView(R.id.tv_payStatus)
    TextView tv_payStatus;
    @BindView(R.id.tv_content)
    TextView tv_content;
    
    int type = 0;// 1(确认收货) 2(支付成功)
    
    String jiner = "";
    String jifen = "";
    String order_id = "";
    
    @Override
    public int getLayout() {
        return R.layout.activity_trade_success;
    }

    @Override
    public String initTitle() {
        return null;
    }

    @Override
    public void initUI(@Nullable Bundle savedInstanceState) {
        type = getIntent().getIntExtra("type",1);
        jiner = getIntent().getStringExtra("jiner");
        jifen = getIntent().getStringExtra("jifen");
        if(type==2){
            tv_payStatus.setText("支付成功");
            tv_content.setText("实付￥"+jiner+" 积分抵用￥"+jifen);
        }
        
    }

    @Override
    public void initData() {
        
    }
    
    @OnClick(R.id.tv_back)
    public void back(){
        finish();
    }
    
    @OnClick(R.id.tv_ckdd)
    public void ckdd(){
        Intent intent = new Intent(TradeSuccessActivity.this, StoreOrderActivity.class);
        startActivity(intent);
        finish();
    }
    
    
}
